Skip to content

ext/pdo_sqlite: EXPLAIN mode support for SQL statements. #18829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

devnexen
Copy link
Member

available since 3.41.0 we can reprepare a statement in either
explain, explain query plan or the usual prepared mode.

available since 3.41.0 we can reprepare a statement in either
 explain, explain query plan or the usual prepared mode.
@devnexen devnexen force-pushed the pdo_sqlite3_explaintome branch 2 times, most recently from 224a680 to 466ddc8 Compare June 10, 2025 20:41
@devnexen devnexen marked this pull request as ready for review June 11, 2025 22:25
@devnexen devnexen closed this in 71a2544 Jun 13, 2025
return 0;
}
if (Z_LVAL_P(zval) < 0 || Z_LVAL_P(zval) > 2) {
zend_value_error("explain mode must be one of the EXPLAIN_MODE_* constants");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For class constants we normally prefix the class name, i.e. Pdo\Sqlite::EXPLAIN_MODE_* constants

@iluuu1994
Copy link
Member

@devnexen It seems this test can fail, presumably due to differences in output in different versions of sqlite.
https://github.com/php/php-src/actions/runs/15658115331/job/44111950494

Can we adjust the tested output while preserving the coverage of this test?

@devnexen
Copy link
Member Author

Ok will do in my pdo sqlite PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants